package com.hairline.controller;

import com.hairline.bean.Brand;
import com.hairline.bean.vo.BaseRespVo;
import com.hairline.bean.vo.WxBrandListVo;
import com.hairline.service.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by fenglin on 2020/9/4 8:19 PM
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {


    @Autowired
    WxBrandService wxBrandService;

    @GetMapping("list")
    public BaseRespVo brandList(Integer page, Integer size){
        WxBrandListVo wxBrandListVo = wxBrandService.brandList(page, size);
        return  BaseRespVo.ok(wxBrandListVo);
    }

    @GetMapping("detail")
    public BaseRespVo brandDetail(Integer id){
        Brand brand = wxBrandService.brandDetail(id);
        return  BaseRespVo.ok(brand);
    }

}
